package edu.uow.devdocs
/**
 * The DevelopmentChecklist entity.
 *
 * @author    
 *
 *
 */
class DevelopmentChecklist {
    static mapping = {
         table 'DEVELOPMENT_CHECKLIST'
         // version is set to false, because this isn't available by default for legacy databases
         version false
         id column:'DEVELOPMENT_CHECKLIST_ID'
		 id generator: 'sequence', params:[sequence:'DEVELOPMENT_CHECKLIST_SEQ']
         project column:'SUB_SYSTEM_ID'
         status column:'STATUS_ID'
         developmentTask column:'DEVELOPMENT_TASK_ID'
         checklist column:'CHECKLIST_ID'
		 sort description:'ASC'
    }
    String description
    Date lastUpdated
    // Relation
    Project project
    // Relation
    DevelopmentChecklistStatus status
    // Relation
    DevelopmentTask developmentTask
    // Relation
    Checklist checklist
	String checklistContent
	
	static belongsTo = [developmentTask: DevelopmentTask]

    static constraints = {
        description(size: 0..255)
        lastUpdated(nullable: true)
        project()
        status()
        developmentTask()
        checklist()
    }
    String toString() {
        return "${description}" 
    }
}
